#include <iostream>
#include <vector>

using namespace std;

class Solution {
public:
  void merge(vector<int> &nums1, int m, vector<int> &nums2, int n) {

    /*
      tail insert
      max first insert
    */
    int iter_v1 = 0;
    int iter_v2 = 0;

    int i = m - 1;
    int j = n - 1;

    int cnt = 0;

    while (i >= 0 && j >= 0) {
      iter_v1 = nums1[i];
      iter_v2 = nums2[j];
      if (iter_v1 >= iter_v2) {
        nums1[m + n - 1 - cnt] = iter_v1;
        i--;
      } else {
        nums1[m + n - 1 - cnt] = iter_v2;
        j--;
      }
      cnt++;
    }

    while (j >= 0) {
      nums1[j] = nums2[j];
      j--;
    }
  }
};

int main() { return 0; }
